package com.mes.cloud.dao;

import com.mes.cloud.api.dto.request.product.ProductSaleStrategyPageListRequest;
import com.mes.cloud.api.dto.request.product.SaleStrategyCustomerProductListRequest;
import com.mes.cloud.entity.BaseAreaSaleStrategy;
import com.mes.cloud.entity.vo.area.BaseAreaSaleProductVo;
import com.mes.cloud.entity.vo.area.SaleStrategyVo;
import com.mes.cloud.entity.vo.product.ProductSaleStrategyVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.ids.SelectByIdsMapper;

import java.util.List;
import java.util.Map;

/**
 * @author dongyi
 * @description 区域产品分销策略
 * @date 2019-08-22 11:47
 **/
public interface BaseAreaSaleStrategyDao extends SelectByIdsMapper<BaseAreaSaleStrategy>, Mapper<BaseAreaSaleStrategy> {

    int batchDeleteSaleStrategy(@Param("list") List<String> ids,
                                @Param("updateDateStr") String updateDateStr,
                                @Param("employeeName") String employeeName,
                                @Param("employeeNo") String employeeNo);

    /**
     * @description 查找产品分销策略
     * @author dongyi
     * @date 2019-08-22 11:46
     **/
    List<SaleStrategyVo> selectSaleStrategy(Map<String, Object> params);

    /**
     * @description 根据组织查找产品分销策略
     * @author dongyi
     * @date 2019-08-22 11:46
     **/
    List<SaleStrategyVo> selectOrgSaleStrategy(Map<String, Object> params);

    /**
     * <产品分销策略查询>
     *
     * @param pageRequest
     * @return List<ProductSaleStrategyVo>
     * @author xy
     * @date 2019/8/26 15:02
     */
    List<ProductSaleStrategyVo> selectProductSaleStrategy(ProductSaleStrategyPageListRequest pageRequest);

    /**
     * 合作关系（cash）_ 导入分销策略_可售、必售产品
     *
     * @Author ysd
     * @Date 16:28 2019/9/23
     */
    List<BaseAreaSaleProductVo> selectCustomerProductByCostomer(SaleStrategyCustomerProductListRequest saleStrategyCustomerProductListRequest);
}
